import os,sys
#os.system('py manage.py')

def f1(cmd):
    return cmd+'1'

def exit_with_help():
    print 'Usage: python importFile.py fileList'
    exit(1)

if len(sys.argv)<2:
    exit_with_help()

fi=open(sys.argv[1],'r')
i=0
while 1:
    line=fi.readline()
    if 'bigWig' in line or 'bw' in line:
    	print line.split('.')
    	i+=1
    	cmd='py ../gis-basic-storage/console/bcs.py build bigWig -i /home/ruijie/gbdb/hg19/bbi/'+line.strip()+' -F bigWig --importmode=softlink --tags=assembly=hg19 --queryop=\'max,access\''
    	print f1(cmd)
    	#os.system(cmd)
    if i>5:
    	break
fi.close()
